package com.aptemo.webetek.shared;

import java.io.Serializable;

import com.aptemo.webetek.client.commands.Response;
import com.aptemo.webetek.client.enums.EnumUserRole;
import com.aptemo.webetek.client.enums.EnumUserStatus;

public class UserBean implements Response, Serializable
{

	/**
	 * 
	 */
	private static final long	serialVersionUID	= 5820456980587208975L;

	private String				key;

	private String				email;

	// private ArrayList<StakeBean> stakes = new ArrayList<StakeBean>();

	private EnumUserStatus		status				= EnumUserStatus.CREATED;

	private EnumUserRole		role;

	private double				balance;

	private double				earnings;

	private int					wonBetCnt;

	private int					totalBetCnt;

	private double				investment;

	protected UserBean()
	{
	}

	public UserBean(String email)
	{
		setEmail(email);
	}

	public void setEmail(String email)
	{
		this.email = email;
	}

	public String getEmail()
	{
		return email;
	}

	public void setRole(EnumUserRole role)
	{
		this.role = role;
	}

	public EnumUserRole getRole()
	{
		return role;
	}

	// public void setStakes(ArrayList<StakeBean> stakes)
	// {
	// this.stakes = stakes;
	// }
	//
	// public ArrayList<StakeBean> getStakes()
	// {
	// return stakes;
	// }

	public void setKey(String key)
	{
		this.key = key;
	}

	public String getKey()
	{
		return key;
	}

	public void setBalance(double balance)
	{
		this.balance = balance;
	}

	public double getBalance()
	{
		return balance;
	}

	public void setStatus(EnumUserStatus status)
	{
		this.status = status;
	}

	public EnumUserStatus getStatus()
	{
		return status;
	}

	// public void setStatistics(StatisticsBean stat)
	// {
	// this.statistics = stat;
	// }
	//
	// public StatisticsBean getStatistics()
	// {
	// return statistics;
	// }

	// @Override
	// public int compareTo(UserBean arg0)
	// {
	// // TODO Auto-generated method stub
	// return 0;
	// }

	public int getWonBetCnt()
	{
		return wonBetCnt;
	}

	public int getTotalBetCnt()
	{
		return totalBetCnt;
	}

	public double getEarnings()
	{
		return earnings;
	}

	public void setEarnings(double earnings)
	{
		this.earnings = earnings;
	}

	public void setWonBetCnt(int wonBetCnt)
	{
		this.wonBetCnt = wonBetCnt;
	}

	public void setTotalBetCnt(int totalBetCnt)
	{
		this.totalBetCnt = totalBetCnt;
	}

	public void setInvestment(double investment)
	{
		this.investment = investment;
	}

	public double getInvestment()
	{
		return investment;
	}

	// @Override
	// public int compareTo(UserBean o)
	// {
	// if (this.getEarnings() < o.getEarnings())
	// {
	// return 1;
	// }
	// else if (this.getEarnings() == o.getEarnings())
	// {
	// return 0;
	// }
	// else
	// {
	// return -1;
	// }
	// // return this.getEarnings().compareTo();
	// }

}
